import axios  from "axios";

// 创建axios实例化
const service = axios.create({
    baseURL:"https://api-hmugo-web.itheima.net/api/public/v1/home",
    timeout:300000, 
    headers:{
        "Content-Type":"application/json;charset=UTF-8"
    }
})

service.interceptors.request.use(
    config => {
        return config;
    },
    error =>{
        Promise.reject(error);
    }
)

service.interceptors.request.use(
    response => {
        return response.data;
    },
    error => {
        return Promise.reject(error);
    }
)

export default service